//package com.rzcf.blink.pay.infrastructure.mq;
//
//import com.rzcf.blink.zh.domain.mq.MqSendService;
//import lombok.RequiredArgsConstructor;
//import lombok.extern.slf4j.Slf4j;
//import org.springframework.amqp.core.MessageDeliveryMode;
//import org.springframework.amqp.rabbit.core.RabbitTemplate;
//import org.springframework.stereotype.Service;
//
///**
// * @author: dongsufeng
// * @date: 2025/7/11$ 15:02$
// */
//@Service
//@RequiredArgsConstructor
//@Slf4j
//public class MqSendServiceImpl implements MqSendService {
//
//    private final RabbitTemplate rabbitTemplate;
//
//    @Override
//    public Boolean send(String exchange, String routingKey, String body) {
//        try {
//            rabbitTemplate.convertAndSend(exchange, routingKey, body, message -> {
//                message.getMessageProperties().setDeliveryMode(MessageDeliveryMode.PERSISTENT);
//                return message;
//            });
//            return true;
//        } catch (Exception ex) {
//            log.error("生产消息失败,body: {},异常: {}", body, ex.getMessage(), ex);
//            return false;
//        }
//    }
//}
